<script type="text/html" template lay-done="layui.data.sendParams(d);">
    <div class="layui-form coreshop-form layui-form-pane" lay-filter="LAY-app-CoreCmsDepartment-editForm" id="LAY-app-CoreCmsDepartment-editForm">
        <input type="hidden" name="id" value="{{d.params.data.model.id || '' }}" />
        <div class="layui-form-item">
            <label for="id" class="layui-form-label  layui-form-required">id</label>
            <div class="layui-input-block">
                <input type="number" min="0" max="999999" name="id" lay-verType="tips" lay-verify="required|number" class="layui-input" value="{{d.params.data.model.id || '' }}" placeholder="请输入id" lay-reqText="请输入id并为数字" />
            </div>
        </div>

        <div class="layui-form-item" style="display:none">
            <label for="groupid" class="layui-form-label  layui-form-required">组别表ID</label>
            <div class="layui-input-block">
                <input type="number" min="0" max="999999" name="groupid" lay-verType="tips" lay-verify="required|number" class="layui-input" value="{{d.params.data.model.groupid || '' }}" placeholder="请输入组别表ID" lay-reqText="请输入组别表ID并为数字" />
            </div>
        </div>

        <div class="layui-form-item">
            <label for="depName" class="layui-form-label  layui-form-required">部门名字</label>
            <div class="layui-input-block">
                <input name="depName" lay-verType="tips" lay-verify="required" class="layui-input" placeholder="请输入部门名字" lay-reqText="请输入部门名字" value="{{d.params.data.model.depName || '' }}" />
            </div>
        </div>

        <div style="display:none" class="layui-form-item" pane>
            <label for="isDefault" class="layui-form-label  layui-form-required">默认</label>
            <div class="layui-input-block">
                <input type="checkbox" lay-filter="switch" name="isDefault" {{ d.params.data.model.isDefault ? 'checked' : '' }} lay-skin="switch" lay-text="开启|关闭">
            </div>
        </div>

        <div class="layui-form-item" pane>
            <label for="isEnable" class="layui-form-label  layui-form-required">是否显示</label>
            <div class="layui-input-block">
                <input type="checkbox" lay-filter="switch" name="isEnable" {{ d.params.data.model.isEnable ? 'checked' : '' }} lay-skin="switch" lay-text="开启|关闭">
            </div>
        </div>

        <div class="layui-form-item">
            <label for="createTime" class="layui-form-label  layui-form-required">创建时间</label>
            <div class="layui-input-block">
                <input name="createTime" id="editTime-CoreCmsDepartment-createTime" type="text" lay-verType="tips" lay-verify="required|datetime" class="layui-input" placeholder="请输入创建时间" lay-reqText="请输入创建时间" value="{{d.params.data.model.createTime || '' }}" />
            </div>
        </div>

        <div class="layui-form-item" style="display:none">
            <label for="number" class="layui-form-label  layui-form-required">编号</label>
            <div class="layui-input-block">
                <input type="number" min="0" max="999999" name="number" lay-verType="tips" lay-verify="required|number" class="layui-input" value="{{d.params.data.model.number || '' }}" placeholder="请输入编号" lay-reqText="请输入编号并为数字" />
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label layui-form-required">公司名称：</label>
            <div class="layui-input-inline">
                <select name="companyid" lay-verify="required">
                    <option value="" selected="selected">请选择</option>
                    {{# layui.each(d.params.data.company, function(index, item){ }}
                <option value="{{ item.id }}" {{ item.id == d.params.data.model.companyid ? 'selected="selected"' : '' }}>{{ item.companyName }}</option>
                    {{# }); }}
                </select>
            </div>
        </div>
        <!--<div class="layui-form-item">
        <label for="companyid" class="layui-form-label  layui-form-required">公司名称</label>
        <div class="layui-input-block">
            <input  type="number" min="0" max="999999" name="companyid"   lay-verType="tips" lay-verify="required|number" class="layui-input" value="{{d.params.data.model.companyid || '' }}" placeholder="请输入公司名称" lay-reqText="请输入公司名称并为数字"  />
        </div>
    </div>-->

        <div class="layui-form-item text-right core-hidden">
            <input type="button" class="layui-btn" lay-submit lay-filter="LAY-app-CoreCmsDepartment-editForm-submit" id="LAY-app-CoreCmsDepartment-editForm-submit" value="确认编辑">
        </div>
    </div>
</script>
<script>
    var debug= layui.setter.debug;
    layui.data.sendParams = function (d) {
        //开启调试情况下获取接口赋值数据
        if (debug) { console.log(d.params.data); }
        layui.use(['admin', 'form', 'laydate', 'upload', 'coreHelper', 'cropperImg'],
        function () {
            var $ = layui.$
                , form = layui.form
                , admin = layui.admin
                , laydate = layui.laydate
                , upload = layui.upload
                , cropperImg = layui.cropperImg
                , coreHelper = layui.coreHelper;
        
            laydate.render({
                elem: '#editTime-CoreCmsDepartment-createTime',
                type: 'datetime',
                fullPanel: true
            });
            form.verify({
                
            });
            //重载form
            form.render(null, 'LAY-app-CoreCmsDepartment-editForm');
        })
    };
</script>
